
class TokenInvalidException(Exception):
    def __init__(self, message: str = "token不合法"):
        self.message = message
        super().__init__(self.message)
        
    def __str__(self):
        return f"TokenInvalidException: {self.message}"
    
    def __repr__(self):
        return f"TokenInvalidException({self.message})"
    
class InvalidGameException(Exception):
    def __init__(self, message: str, user_id: str = None, game_id: str = None):
        self.message = message
        self.user_id = user_id
        self.game_id = game_id
        super().__init__(self.message)
        
    def __str__(self):
        return f"InvalidGameException: {self.message}"
    
    def __repr__(self):
        return f"InvalidGameException({self.message})"
    
class InvalidActionException(Exception):
    def __init__(self, message: str, user_id: str = None, game_id: str = None):
        self.message = message
        self.user_id = user_id
        self.game_id = game_id
        super().__init__(self.message)
        
    def __str__(self):
        return f"InvalidActionException: {self.message}"
    
    def __repr__(self):
        return f"InvalidActionException({self.message})"
